<?php
class PersonHelper
{

	// Slazo John Haert
	function getFullName($first_name, $middle_name = false, $last_name = false) {
		
		if(is_array($first_name)) {
			extract($first_name);
		}
		
		if($middle_name) {
			@$str = ucwords($last_name.', '.$first_name.' '.$middle_name); 
		} elseif ($first_name || $last_name) {
			@$str = ucwords($last_name.' '.$first_name); 
		} else {
			$str = '';
		}
		return $str;
	}
	
	// Scalzo E.D.
	function getShortName($first_name, $middle_name = false, $last_name = false) {
		
		if(is_array($first_name)) {
			extract($first_name);
		}		
		
		if($first_name || $last_name) {
			$str = ucwords($last_name.' '.$first_name);
//			$str = ucwords($last_name.' '.$first_name{0}.'.');
			if($middle_name) { $str .= ucwords($middle_name{0}).'.'; }
		} else {
			$str = '';
		}
		return $str;
	}
	
	// John Scalzo
	function getEmailName($first_name, $last_name = false) {		
	
		if(is_array($first_name)) {
			extract($first_name);
		}
		
		$str = ucwords($first_name) . ' ' . ucwords($last_name);
		return $str;
	}
}
?>
